import type { TableColumn } from '@/components/core/dynamic-table';

export type TableListItem = API.LawsListPageResultItem;
export type TableColumnItem = TableColumn<TableListItem>;

export const baseColumns: TableColumnItem[] = [
  {
    title: '关键词',
    dataIndex: 'keyword',
    hideInTable: true,
    searchField: 'keyword',
    formItemProps: {
      labelWidth: 55,
      componentProps: () => {
        return {
          placeholder: '可输入条款名称搜索',
          autocomplete: 'off',
          disabledLabelWidth: true,
        };
      },
    },
  },
  {
    title: '法律法规',
    width: 50,
    dataIndex: 'chapter',
    hideInSearch: true,
  },
  {
    title: '相关条款',
    dataIndex: 'term',
    width: 400,
    hideInSearch: true,
  },
];
